package com.cskaoyan.controller.wxcatalog;

import com.cskaoyan.bean.MallCategory;
import com.cskaoyan.model.vo.BaseRespVo;
import com.cskaoyan.model.vo.wxcategory.WxCategoryIndexVo;
import com.cskaoyan.model.vo.wxcategory.WxCategoryVo;
import com.cskaoyan.service.wxcatalog.WxCatalogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: mjm
 * @Date: 2021/12/2
 * @Time: 15:49
 * @Description:
 */
@RestController
@RequestMapping("wx/catalog")
public class WxCatalogController {
    @Autowired
    WxCatalogService catalogService;

    @GetMapping("current")
    public BaseRespVo catalogCurrent(Integer id){
        WxCategoryVo wxCategoryVo = catalogService.catalogCurrent(id);

        return BaseRespVo.ok(wxCategoryVo);
    }

    @GetMapping("index")
    public BaseRespVo catalogIndex(){
        WxCategoryIndexVo wxCategoryIndexVo = catalogService.catalogIndex();
        return BaseRespVo.ok(wxCategoryIndexVo);
    }
}
